﻿<controlBase:IndexPanelBase x:Class="Rio.Framework.Pages.Controls.FlowIndexPanel"
                            xmlns:sdk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                            xmlns:Control="clr-namespace:Rio.Framework.Pages.Controls;assembly=Rio.Framework.Pages"
                            xmlns:controlBase="clr-namespace:Rio.Framework.Pages.Controls.BaseClass;assembly=Rio.Framework.Pages"
                            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                            xmlns:CriteriaControls="clr-namespace:Rio.Framework.Pages.CriteriaControls"
                            mc:Ignorable="d"
                            d:DesignHeight="700"
                            d:DesignWidth="300"
                            Width="330"
                            x:Name="FlowIndexPanelControl">

    <controlBase:IndexPanelBase.Resources>
        <Style x:Key="LabelControleDocumentStyle"
               TargetType="TextBlock">
            <Setter Property="Margin"
                    Value="5,10,15,0" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="TextWrapping"
                    Value="Wrap" />
        </Style>

        <Style x:Key="TextBoxControleDocumentStyle"
               TargetType="TextBox">
            <Setter Property="Margin"
                    Value="5,0,15,0" />
            <Setter Property="HorizontalAlignment"
                    Value="Stretch" />
            <Setter Property="TextWrapping"
                    Value="Wrap" />
        </Style>
    </controlBase:IndexPanelBase.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="120" />
            <RowDefinition Height="*" />
            <RowDefinition Height="45" />
            <RowDefinition Height="60" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style x:Key="ComboBoxStyle"
                   TargetType="ComboBox">
                <Setter Property="Height"
                        Value="25" />
                <Setter Property="Margin"
                        Value="5,0,5,0" />
                <Setter Property="HorizontalAlignment"
                        Value="Stretch" />
            </Style>

            <Style x:Key="TextBlockStyle"
                   TargetType="TextBlock">
                <Setter Property="Margin"
                        Value="5,5,5,0" />
                <Setter Property="HorizontalAlignment"
                        Value="Stretch" />
                <Setter Property="TextWrapping"
                        Value="Wrap" />
            </Style>

            <Style x:Key="RadDatePickerStyle"
                   TargetType="telerik:RadDatePicker">
                <Setter Property="Margin"
                        Value="5,0,5,0" />
                <Setter Property="HorizontalAlignment"
                        Value="Stretch" />
            </Style>
        </Grid.Resources>

        <ContentControl>
            <Control:UCOrganizationTypePanel x:Name="UCOrganizationType">
            </Control:UCOrganizationTypePanel>
        </ContentControl>

        <Grid Margin="0,0,5,0"
              Grid.Row="1"
              VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="17" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <TextBlock x:Name="labelFolder"
                       TextWrapping="Wrap"
                       HorizontalAlignment="Left"
                       Margin="5,0,0,0"
                       VerticalAlignment="Center" />
            <telerik:RadTabControl x:Name="informationsTabControl"
                                   Grid.Row="1"
                                   BorderThickness="1"
                                   BackgroundVisibility="Collapsed"
                                   VerticalAlignment="Stretch"
                                   VerticalContentAlignment="Stretch">
                <telerik:RadTabItem x:Name="indexTabItem"
                                    BorderThickness="0"
                                    VerticalAlignment="Stretch"
                                    VerticalContentAlignment="Stretch">
                    <telerik:RadTabItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="../Assets/Images/index.png"
                                   Width="12"
                                   Height="12"
                                   Margin="2,2,2,2" />
                            <TextBlock x:Name="labelIndexTabHeader" />
                        </StackPanel>
                    </telerik:RadTabItem.Header>
                    <ScrollViewer x:Name="indexScrollViewer"
                                  VerticalAlignment="Stretch"
                                  VerticalContentAlignment="Stretch"
                                  VerticalScrollBarVisibility="Auto"
                                  BorderThickness="0">
                        <StackPanel Orientation="Vertical"
                                    VerticalAlignment="Stretch">

                            <CriteriaControls:StackIndexControl x:Name="StackIndex"
                                                                IsSearchMode="False"
                                                                HorizontalAlignment="Stretch"
                                                                VerticalAlignment="Stretch"
                                                                ChronoNumberGenerated="StackIndexChronoNumberGenerated" />

                            <!--<StackPanel x:Name="StackIndex"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch" />-->

                            <Path Data="M64,159 L233.49927,159"
                                  Fill="#FF013658"
                                  Height="2"
                                  Stretch="Fill"
                                  Stroke="#FF013658"
                                  UseLayoutRounding="False"
                                  Margin="20,10" />
                            <StackPanel x:Name="propertiesStackPanel"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        Margin="0,0,0,0">
                                <TextBlock x:Name="labelInfoDoc"
                                           FontWeight="Bold"
                                           HorizontalAlignment="Left"
                                           TextWrapping="Wrap" />

                                <TextBlock x:Name="labelNote"
                                           Style="{StaticResource LabelControleDocumentStyle}" />

                                <TextBox Margin="5,0,15,0"
                                         Height="60"
                                         MaxWidth="260"
                                         AcceptsReturn="True"
                                         x:Name="textboxNote"
                                         Style="{StaticResource TextBoxControleDocumentStyle}"
                                         TextWrapping="Wrap"
                                         HorizontalScrollBarVisibility="Auto"
                                         VerticalScrollBarVisibility="Auto"
                                         MaxLength="1024"
                                         GotFocus="L_oUiElementIndexControl_GotFocus" />

                                <TextBlock x:Name="labelAuthor"
                                           Style="{StaticResource LabelControleDocumentStyle}" />
                                <TextBox x:Name="textboxAuthor"
                                         Style="{StaticResource TextBoxControleDocumentStyle}"
                                         MaxWidth="260"
                                         MaxLength="50"
                                         GotFocus="L_oUiElementIndexControl_GotFocus" />

                                <TextBlock x:Name="labelCreditPhoto"
                                           Visibility="Collapsed"
                                           Style="{StaticResource LabelControleDocumentStyle}" />
                                <TextBox x:Name="textboxCreditPhoto"
                                         Visibility="Collapsed"
                                         Style="{StaticResource TextBoxControleDocumentStyle}"
                                         MaxWidth="260"
                                         IsReadOnly="True"
                                         MaxLength="50"
                                         GotFocus="L_oUiElementIndexControl_GotFocus" />

                                <TextBlock x:Name="labelPublicationDate"
                                           Style="{StaticResource LabelControleDocumentStyle}"
                                           Visibility="Collapsed" />
                                <telerik:RadDatePicker x:Name="DatePickerPublicationDate"
                                                       Culture="en-GB"
                                                       Style="{StaticResource RadDatePickerStyle}"
                                                       Visibility="Collapsed"
                                                       GotFocus="L_oUiElementIndexControl_GotFocus" />

                                <TextBlock x:Name="labelVideoTime"
                                           Style="{StaticResource LabelControleDocumentStyle}"
                                           Visibility="Collapsed" />
                                <TextBox x:Name="textboxVideoTime"
                                         Style="{StaticResource TextBoxControleDocumentStyle}"
                                         Visibility="Collapsed"
                                         MaxWidth="260"
                                         MaxLength="45"
                                         GotFocus="L_oUiElementIndexControl_GotFocus" />
                            </StackPanel>
                        </StackPanel>
                    </ScrollViewer>
                </telerik:RadTabItem>
                <telerik:RadTabItem x:Name="itemsTabItem"
                                    VerticalAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"
                                    BorderThickness="0">
                    <telerik:RadTabItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="../Assets/Images/items.png"
                                   Width="12"
                                   Height="12"
                                   Margin="2,2,2,2" />
                            <TextBlock x:Name="labelItemsTabHeader" />
                        </StackPanel>
                    </telerik:RadTabItem.Header>
                    <ScrollViewer x:Name="itemsScrollViewer"
                                  VerticalAlignment="Stretch"
                                  VerticalContentAlignment="Stretch"
                                  VerticalScrollBarVisibility="Auto"
                                  BorderThickness="0">
                        <StackPanel>
                            <TextBlock x:Name="labelClassement"
                                       TextWrapping="Wrap"
                                       FontWeight="Bold" />
                            <CriteriaControls:ItemTreeview x:Name="TreeViewControlItems"
                                                           IsSearchMode="False"
                                                           VerticalAlignment="Stretch"
                                                           VerticalContentAlignment="Stretch" PropertyChanged="TreeViewControlItemsPropertyChanged" />
                        </StackPanel>
                    </ScrollViewer>
                </telerik:RadTabItem>
            </telerik:RadTabControl>
        </Grid>

        <StackPanel Grid.Row="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    Margin="10,5,5,5">
            <CheckBox Name="checkBoxFullText" 
                      IsChecked="True" />
            <CheckBox Name="checkBoxKeepCriteria" Visibility="Collapsed" Checked="checkBoxKeepCriteria_Checked" Unchecked="checkBoxKeepCriteria_Unchecked"
                      IsChecked="False" />
        </StackPanel>
        <StackPanel Grid.Row="3"
                    Orientation="Vertical"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch"
                    Margin="0,5,0,0">
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Center">
                <Button Name="buttonCancel"
                        Margin="2,0,2,0"
                        Click="buttonCancel_Click">
                    <Button.Content>
                        <StackPanel Orientation="Horizontal">
                            <Image Width="16"
                                   Height="16"
                                   Margin="0,0,2,0"
                                   Source="../../Assets/Images/Cancel.png" />
                            <TextBlock Name="TextBlockCancel"
                                       VerticalAlignment="Center" />
                        </StackPanel>
                    </Button.Content>
                </Button>
                <Button Name="buttonToSearch"
                        Margin="2,0,2,0"
                        Click="buttonToSearch_Click">
                    <Button.Content>
                        <StackPanel Orientation="Horizontal">
                            <Image Width="16"
                                   Height="16"
                                   Margin="0,0,2,0"
                                   Source="../../Assets/Images/SearchBinoculars.png" />
                            <TextBlock Name="TextBlockToSearch"
                                       VerticalAlignment="Center" />
                        </StackPanel>
                    </Button.Content>
                </Button>
            </StackPanel>
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Center"
                        Margin="0,5,0,5">
                <Button Name="buttonClear"
                        Margin="2,0,2,0"
                        Click="buttonClear_Click">
                    <Button.Content>
                        <StackPanel Orientation="Horizontal">
                            <Image Width="16"
                                   Height="16"
                                   Margin="0,0,2,0"
                                   Source="../../Assets/Images/Clear.png" />
                            <TextBlock Name="TextBlockClear"
                                       VerticalAlignment="Center" />
                        </StackPanel>
                    </Button.Content>
                </Button>
                <Button Name="buttonToIndex"
                        Margin="2,0,2,0"
                        Click="buttonToIndex_Click">
                    <Button.Content>
                        <StackPanel Orientation="Horizontal">
                            <Image Width="16"
                                   Height="16"
                                   Margin="0,0,2,0"
                                   Source="../../Assets/Images/Validate.png" />
                            <TextBlock Name="TextBlockToIndex"
                                       VerticalAlignment="Center" />
                        </StackPanel>
                    </Button.Content>
                </Button>
            </StackPanel>
        </StackPanel>


        <!--</Border>-->
    </Grid>

</controlBase:IndexPanelBase>